FROM 192.168.1.52/tenx_containers/oraclejdk:8u151

MAINTAINER joshua zhuangxinjie@tenxcloud.com

ENV PROFILE  test
ENV MYSQL_HOST  10.72.76.80
ENV MYSQL_USER  root
ENV MYSQL_PASSWORD  ToHVtvyG4tHxGBIJ
ENV MYSQL_PORT  3306
ENV rabbitmq_host spring-cloud-rabbitmq
ENV rabbitmq_port 5672

ADD zipkin-client.jar /app/app.jar

WORKDIR "/app"

EXPOSE 9875

ENTRYPOINT ["java", "-Xms256m", "-Xmx1g", \
            "-XX:+UnlockExperimentalVMOptions", \
            "-XX:+UseCGroupMemoryLimitForHeap", \
            "-Dspring.profiles.active=${PROFILE}", \
            "-Dmysql.host=${MYSQL_HOST}", \
            "-Dmysql.user=${MYSQL_USER}", \
            "-Dmysql.password=${MYSQL_PASSWORD}", \
            "-Dmysql.port=${MYSQL_PORT}", \
            "-Drabbitmq.host=${rabbitmq_host}", \
            "-Drabbitmq.port=${rabbitmq_port}", \
            "-jar", "/app/app.jar"]
